#include "drand48.h"
#ifdef __WIN32 
#define mmdl 0x100000000LL  
#define cmdl 0xB16  
#define amdl 0x5DEECE66DLL  
  
static unsigned long long seed = 1;  

double drand48(void)  
{  
    seed = (amdl * seed + cmdl) & 0xFFFFFFFFFFFFLL;  
    unsigned int x = seed >> 16;  
    return  ((double)x / (double)mmdl);  
      
}  
  
void srand48(unsigned int i)  
{  
    seed  = (((long long int)i) << 16) | rand();  
} 

#endif